using System;
using System.Collections.Generic;
using System.ByteBuffer;
using tools;

namespace Zjh
{
    /// <summary>
    /// generate by msg tool
    /// 请求创建房间
    /// </summary>
	public class ReqCreateRoomMsg : ReqMessage
	{
		//局数
		public int rounds;
		//人数
		public int players;

        public ReqCreateRoomMsg() { }

        public ReqCreateRoomMsg(int rounds, int players)
        {
            this.rounds = rounds;
            this.players = players;
        }

        
		public void write(object obj)
		{
            ByteBuffer b = obj as ByteBuffer;
			b.PushInt(rounds);
			b.PushInt(players);
			
		}

	    public void read(object obj)
		{
            MyConverter b = obj as MyConverter;
			rounds = b.toInt32();
			players = b.toInt32();
			
		}

		public int Id
		{
            get { return 519105; }
		}

        public String Desc
        {
            get { return "请求创建房间"; }
        }
	}
}